#!/usr/bin/env python2.5

import tailq, random

def GetRandString(Length):
   retval = ""
   if Length:
      while (len(retval) < Length):
         number = random.randint(1, 1000) % 127
         if ((number > 32) and (number < 39)):
            retval += chr(number)
         elif ((number > 47) and (number < 58)):
            retval += chr(number)
         elif ((number > 63) and (number < 91)):
            retval += chr(number)
         elif ((number > 96) and (number < 123)):
            retval += chr(number)

   assert (len(retval) == Length)
   print retval
   return retval


queue = tailq.init()
queue.add(GetRandString(10), random.randint(1, 1000))
print dir(queue)
